/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tugas_enkapsulasi;

/**
 *
 * @author novaldebbyp
 */
public class testVehicle {
    public static void main(String[] args){
        double maxLoad=10000;
        boolean addBox;
        Vehicle cVehicle = new Vehicle(maxLoad);
        System.out.println("Creating a vehicle with a " + maxLoad + " maximum load.");
        addBox = cVehicle.addBox(500);
        System.out.println("Add box #1 (500kg) : " + addBox);
        addBox = cVehicle.addBox(250);
        System.out.println("Add box #2 (250kg) : " + addBox);
        addBox = cVehicle.addBox(5000);
        System.out.println("Add box #3 (5000kg) : " + addBox);
        addBox = cVehicle.addBox(4000);
        System.out.println("Add box #4 (4000kg) : " + addBox);
        addBox = cVehicle.addBox(300);
        System.out.println("Add box #5 (300kg) : " + addBox);
        System.out.println("Vehicle load is "+ cVehicle.getLoad() +" kg");
    }
}
